#ifndef __IOTGO_DATA_POOL__
#define __IOTGO_DATA_POOL__

#include <stdlib.h>

#define TYPE_UPDATE   1
#define TYPE_UPGRADE  2
#define TYPE_DATE     3
#define TYPE_PARAM    4

#define IOTGO_DATA_POOL_FAIL          (-1)

typedef struct iotgo_data IOTGO_DATA_TYPE;

struct iotgo_data
{
    unsigned char type;
    unsigned char sequence[14];
    unsigned char params[2048];

};


extern signed char createIotgoDataPool(void);

extern signed char releaseIotgoDataPool(void);

extern signed char writeToIotgoDataPool(IOTGO_DATA_TYPE *buf);

extern signed char readFromIotgoDataPool(unsigned char type,IOTGO_DATA_TYPE *buf);

extern signed char cleanIotgoDataPool(void);

//extern int availableDataInPool(iotgoDataPool *const obj);

//extern int isDataPoolFull(iotgoDataPool * const obj);

//extern int isDataPoolEmpty(iotgoDataPool * const obj);

#endif
